package org.example.admin.entity;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;
import org.example.core.valid.annontation.ListValue;
import org.example.core.valid.group.AddGroup;
import org.example.core.valid.group.UpdateGroup;

/**
 * @author 小杰_cc
 * @version 1.0
 */
@Data
public class RoleEntity implements Serializable {
	@Serial
	private static final long serialVersionUID = 1L;

	/**
	 * 角色id
	 */
	@NotNull(message = "修改时必须指定id",groups = {UpdateGroup.class})
	@Null(message = "添加时不能指定id",groups = {AddGroup.class})
	private Long id;
	/**
	 * 角色名称
	 */
	@NotBlank(message = "角色名不能为空",groups = {UpdateGroup.class, AddGroup.class})
	private String roleName;
	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 角色状态
	 */
	@NotNull(message = "角色状态不能为空",groups = {UpdateGroup.class, AddGroup.class})
	@ListValue(value = {0,1}, message = "角色状态类型错误",groups = {UpdateGroup.class, AddGroup.class})
	private Integer status;
	/**
	 * 创建人
	 */
	private Long createUser;
	/**
	 * 修改人
	 */
	private Long updateUser;
	/**
	 * 创建时间
	 */
	private LocalDateTime createTime;
	/**
	 * 更新时间
	 */
	private LocalDateTime updateTime;

}
